from selenium import webdriver
import time
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.maximize_window()
# 打开网易见外工作台
driver.get("https://jianwai.youdao.com/")
time.sleep(2)

# 先定位到表单元素
element_iframe = driver.find_element(By.CSS_SELECTOR, "iframe[id]")
# 切换进入表单
# driver.switch_to_frame(element_iframe)
driver.switch_to.frame(element_iframe)

# 账号输入框输入邮箱
driver.find_element(By.CSS_SELECTOR, "input[name=email]").send_keys("974381044@qq.com")
# 密码输入框输入密码
driver.find_element(By.XPATH, "//input[@name='password']").send_keys("zytc@12310120")
# 点击-登录
driver.find_element(By.ID, "dologin").click()

time.sleep(5)
driver.quit()